﻿@model List<SmartAnalytics.Services.Models.VisitorActiveByDayPageItem>
@{
    ViewBag.Title = "活跃度";
}

<div class="row">

    @Html.Partial("_PartialMenu")

    <div class="col-md-9 ">

        <ol class="breadcrumb">
            <li><a href="/">SmartAnalytics</a></li>
            <li><a href="/Visitor">访客分析</a></li>
            <li class="active">活跃度</li>
        </ol>

        <!--网站域名-->
        @Html.Partial("_PartialSiteDomain", ViewBag.AllDomain as List<SmartAnalytics.Entities.Domain>)

        <div class="callout callout-primary">
            <div class="btn-group" id="tool-list">
                <a class="btn btn-default btn-group-lg" data-date="@DateTime.Now.ToString("yyyy-MM-dd")"
                   href="/Visitor/ActivityDegree?date=@DateTime.Now.ToString("yyyy-MM-dd")&domain=@ViewBag.SiteDomain">今日</a>

                <a class="btn btn-default btn-group-lg" data-date="@DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")"
                   href="/Visitor/ActivityDegree?date=@DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")&domain=@ViewBag.SiteDomain">昨日</a>

                <a class="btn btn-default btn-group-lg" data-date="@DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd")"
                   href="/Visitor/ActivityDegree?date=@DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd")&domain=@ViewBag.SiteDomain">前天</a>
            </div>
        </div>

        <!--表格栏-->
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">统计报表(@ViewBag.Date)</h3>
            </div>

            <table class="table table-hover table-condensed table-bordered center">
                <thead>
                    <tr>
                        <th class="center">序号</th>
                        <th class="center">访问深度</th>
                        <th class="center">访问次数</th>
                        <th class="center">占比</th>
                    </tr>
                </thead>
                <tbody>

                    @for (var i = 0; i < Model.Count; i++)
                    {
                        <tr>
                            <td>@(i + 1)</td>
                            <td>@(Model[i].Depth)页</td>
                            <td>@Model[i].DepthCount</td>
                            <td>@((Model[i].Percent * 100).ToString("F2"))%</td>
                        </tr>
                    }

                </tbody>
            </table>

        </div>

        @if (Model.Count == 0)
        {

            <div class="alert alert-info" role="alert">
                说明：未查询到数据。
            </div>
        }

    </div>
</div>
